using System;
using NUnit.Framework;
using RFS.BizLogic;
using RFS.BizLogic.PaiShi;
using RFS.BizLogic.Sys;
using RFS.Domain.PaiShi;
using RFS.Domain.Sys;
using ycx;

namespace TestWPF2.PaiShi
{
    public class TPaiShi
    {
        private IAntiObject _en;


        [SetUp]
        public void setup()
        {
            _en = Starter.StartApp(true);
        }


        [Test]
        public void T10_GetAPrice_Given_Product_ReturnAPrice()
        {


            var json = $@"
{{
  ""AccRepoInitedOK"" : false,
  ""AliYxAccessKey_ID"" : ""LTAI5tG3My56cvgqfJ41WaK3"",
  ""AliYxAccessKey_secret"" : ""6LJK7a3HC6xa9VPySrEONYf9aUICxJ"",
  ""TestMode"" : false,
  ""MainMenu"" : {{
    ""Items"" : [ {{
      ""Title"" : ""拍市账务稽核"",
      ""SubItems"" : [ ""拍市账务稽核入口"" ]
    }} ]
  }},
  ""SmartChoosePrice"" : true,
  ""CompareModeOfCash"" : true,
  ""CompactFormStyle"" : false,
  ""ShowGridDetails"" : false,
  ""ProductRepoInitedCorrectly"" : true
}}
";
            var d = json.ToObject<dynamic>();
            var j = (d as object).ToJson();
            j.Echo("dj:", asjson: false);
            var o = j.ToObject<ConfigSys>();
            o.Echo();

        }
        //
 
        [Test]
        public void T10_GetAPriceItems_Given_ADate_ReturnAPrices()
        {

            var ps = _en.Get<IPaiShiOrg>();
            var price= ps.GetPriceItemsByDate(DateTime.Today);
            price.Echo();
            

        }
        
 
        
        
        
    }
}